#pragma once
#include "IDrawable.h"
#include "..\EdgeMath\Vectors.h"
#include "Material.h"

class Model : public IDrawable
{
	Matrix worldTransform;

	Material* material = nullptr;

	VertexBuffer* vBuffer;

	vector<ID3D11ShaderResourceView*> srv;


public:
	Model(VertexBuffer* vBuffer);
	virtual ~Model(void);

	/////////////////////////<Accessors>///////////////////////////////////////////////////

	virtual VertexBuffer* getVertexBuffer(void) const override { return vBuffer; }

	virtual IGraphicsResource** getResourceViews(void) const override { return (IGraphicsResource**)material->textures.e; }

	virtual int getNumResourceViews(void) const override { return Material::numTextures; }

	virtual ShaderContainer* getShaderContainer(void) const override;

	virtual Matrix getWorldTransform(void) const override { return worldTransform; }

	/////////////////////////<Mutators>///////////////////////////////////////////////////

	void setWorldTransform(Matrix& value) { worldTransform = value; }

	virtual void setResourceView(IGraphicsResource* value, unsigned int index) override;

	virtual void Model::setShaderContainer(ShaderContainer* value) override;	

	void SetMaterial(Material* value) { material = value; }
};